import React from "react";

import ProductDetail from "../Detail";
import ProductHome from "../ProductHome";
import UpDate from "../add-Update";
import { Navigate, Route, Routes } from "react-router";

const Product: React.FC = () => {
  return (
    <div className="content">
      <Routes>
        <Route path="/home" element={<ProductHome />}></Route>
        <Route path="/update" element={<UpDate />}></Route>
        <Route path="/detail" element={<ProductDetail />}></Route>
        <Route path="*" element={<Navigate to="/admin/product/home" />}></Route>
      </Routes>
    </div>
  );
};

export default Product;
